#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void timerEvent(QTimerEvent *event);
    void paintEvent(QPaintEvent *event);
    void keyPressEvent(QKeyEvent *event);
    void keyReleaseEvent(QKeyEvent *event);
private slots:
    void on_pushButton_clicked();

    void on_actionOpen_Game_triggered();

private:
    const int mKeyMap[8] = {
            // A, B, Select, Start, Up, Down, Left, Right
            Qt::Key_J, Qt::Key_K, Qt::Key_U, Qt::Key_I, Qt::Key_W, Qt::Key_S, Qt::Key_A, Qt::Key_D,
    };
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
